﻿
-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_Feedback_GetAll')
	BEGIN
		DROP  Procedure  Ivy_Feedback_GetAll
	END

GO

CREATE PROCEDURE [Ivy_Feedback_GetAll]
-- =============================================
-- Author:		<Ali BALCI>
-- Create date: <28-07-2012>
-- Description:	<Ivy_Feedback_GetAll>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@Sys_IsDeleted int = 0,
				@Sys_OrganizationID int = NULL
	)

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

	SELECT	[FeedbackKey],
			[FeedbackUserKey],
			[FeedbackText],
			[FeedbackDate],
			[SYS_DateOfCreation],
			[SYS_DateOfModification],
			[SYS_CreatedByID],
			[SYS_ModifiedByID],
			[SYS_DeleteType],
			[SYS_IsDeleted],
			[SYS_OrganizationID],
			[SYS_InitialPrimaryKeys],
			[SYS_WorkstationName]
	 FROM	[Feedback]
	 WHERE
		(
			[Sys_IsDeleted] = @Sys_IsDeleted AND
			[Sys_OrganizationID] = ISNULL( @Sys_OrganizationID, [Sys_OrganizationID] )
		);
END
GO
